﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace GameProject.View
{
    class MasterView
    {
        #region Fields

        private GraphicsDeviceManager m_graphicsDeviceManager;
        #endregion

        #region Constructs

        public MasterView(GraphicsDeviceManager a_graphicsDeviceManager)
        {
            m_graphicsDeviceManager = a_graphicsDeviceManager;
        }
        #endregion

        #region Methods

        public void Draw()
        {
            // Set a background color.
            m_graphicsDeviceManager.GraphicsDevice.Clear(Color.Black);
        }

        public bool DidUserExitGame()
        {
            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape) == true)
                return true;
            return false;
        }
        #endregion
    }
}